package jdkrel._reflect;

import sun.reflect.Reflection;

public class _ClassDemo {

    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        Class<?> aClass = Class.forName("jdkrel._reflect._ReflectObject");
        _ReflectObject reflectObject = (_ReflectObject) aClass.newInstance();
        System.out.println(reflectObject);


//        System.out.println(Reflection.getCallerClass(-1));
        System.out.println(Reflection.getCallerClass(0));
        System.out.println(Reflection.getCallerClass(1));
        System.out.println(Reflection.getCallerClass(2));
        System.out.println(Reflection.getCallerClass(3));
        System.out.println(Reflection.getCallerClass(4));
    }
}
